//寻找两个正序数组的中位数
/*常规解法
var findMedianSortedArrays = function(nums1, nums2) {
    const numbers = nums1.concat(nums2).sort((a,b) => a-b);
    console.log(numbers);
    if(numbers.length % 2 === 0) {
        return (numbers[numbers.length/2] + numbers[numbers.length/2-1])*0.5
    } else {
        return numbers[(numbers.length-1)/2]*1.0
    }
};
const nums1 = [2,3,4,-1];
const nums2 = [5,9,6,7,8];
console.log(findMedianSortedArrays(nums1,nums2));
*/
// 双指针法
var findMedianSortedArrays = function(nums1, nums2) {
    let m = nums1.length;
    let n = nums2.length;
    let move = 0;
    if((m+n)%2 ===0) {
        while(move > (m+n)/2) {

        }
    }
    
};
const nums1 = [2,3,4,-1];
const nums2 = [5,9,6,7,8];
console.log(findMedianSortedArrays(nums1,nums2));